package com.tms.springboot.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.tms.springboot.aggregation.pojo.PdCoreOrg;
import com.tms.springboot.mapper.PdCoreOrgMapper;
import com.tms.springboot.service.PdCoreOrgService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tms.springboot.vo.CoreOrgJobInfoVo;
import com.tms.springboot.vo.PdCoreOrgVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 组织 服务实现类
 * </p>
 *
 * @author cjj
 * @since 2023-06-14
 */
@Service
public class PdCoreOrgServiceImpl extends ServiceImpl<PdCoreOrgMapper, PdCoreOrg> implements PdCoreOrgService {


    @Autowired
    private PdCoreOrgMapper mapper;
    @Override
    public List<PdCoreOrgVo> queryCoreOrgList() {

        return this.mapper.queryCoreOrgList();
    }

    @Override
    public PageInfo<CoreOrgJobInfoVo> queryCoreOrgListByFuzzyQueries(Map<Object, Object> map) {
        PageHelper.startPage(Integer.parseInt(map.get("currentPage")+""),Integer.parseInt(map.get("pageSize")+""));
        return new PageInfo<>(mapper.queryCoreOrgListByFuzzyQueries(map));
    }
}
